import java.io.File;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
public class ChooseFile
{
	public  String fileChoose()
	{
		JFileChooser filechooser = new JFileChooser();
		filechooser.addChoosableFileFilter(new ImageFilter());
		int result = filechooser.showOpenDialog(null);
		if(result == JFileChooser.APPROVE_OPTION)
		{
			String mediaurl = null;
			mediaurl = filechooser.getSelectedFile().toString();
			
			if(mediaurl != null)
			{
				
				return mediaurl;
			}
		}
		return null;
	}
}